import request from '@/utils/request'
export function preparationTree(index) { //台账管理-设备台账-查询权限内设施设备树1
    return request({
        url: '/project-quality/api/equipmentInfo/allTrees/'+index,
        method: 'get'
    })
}
export function deptList() { //获取用户所属分公司和权限内跟公司
    return request({
        url: '/sys-center/api/system/dept',
        method: 'get'
    })
}
//原 put
export function preparationEdit(data) { //维修管理-主体信息-新增
    return request({
        url: '/maintenance-management/api/maintenance/repairInfo/put',
        method: 'post',
        data
    })
}
export function preparationAdd(data) { //维修管理-主体信息-新增
    return request({
        url: '/maintenance-management/api/maintenance/repairInfo/add',
        method: 'post',
        data
    })
}
export function preparationAddSubmit(data) { //保存并提交
    return request({
        url: '/maintenance-management/api/maintenance/repairInfo/commit',
        method: 'post',
        data
    })
}

export function facilitiesAllList() { //台账管理-设施台账-设施管理-查询权限内所有设施
    return request({
        url: '/project-quality/api/equipmentInfo/facilityList',
        method: 'get',
    })
}
export function facilitiesAllDetails(id) { //维修管理-主体信息-单条查询
    return request({
        url: '/maintenance-management/api/maintenance/repairInfo/'+id,
        method: 'get',
    })
}
export function facilitiesAllDetailsPost(data) { //维修管理-主体信息-单条查询-可以进行设施回显
    return request({
        url: '/maintenance-management/api/maintenance/repairInfo/query',
        method: 'post',
        data:data
    })
}

export function facilitiesAllExport() { //下载导入的Excel的模板
    return request({
        url: '/maintenance-management/api/maintenance/repairInfo/download',
        responseType: 'arraybuffer',
        method: 'POST',
    })
}
export function facilitiesAllOrganization(data) { //计划版本下拉
    return request({
        url: '/maintenance-management/api/maintenance/repairInfo/organization',
        method: 'POST',
        data,
    })
}
export function facilitiesAllImportpresent(data) { //导入当前版本
    return request({
        url: '/maintenance-management/api/maintenance/repairInfo/repairInfo/plan',
        method: 'POST',
        data,
    })
}



